﻿<table class="display dataTable">
    <thead>
        <tr>
            <th>Tên tài khoản</th>
            <th style="width:210px;">Mã tài khoản</th>
            <th style="width:210px;">Email</th>
            <th>Quản lý</th>
        </tr>
    </thead>
    <tbody>
        @{foreach (var TK in Model)
          {
            <tr class="odd">
                <td>
                    <div class="nonDisplay">
                        @{var page = Model.PageNumber;}
                        <input type="text" class="@TK.tenTaiKhoan" value="@page"/>
                    </div>@TK.tenTaiKhoan</td>
                <td>
                    <div class="nonDisplay" id="passTKT@{@TK.tenTaiKhoan}">
                        <input type="text" class="passTaiKhoan passTK@{@TK.tenTaiKhoan}" value="@TK.passwordTaiKhoan"/>
                    </div>
                    <div id="passTKTT@{@TK.tenTaiKhoan}">@TK.passwordTaiKhoan</div>
                </td>
                <td>
                    <div class="nonDisplay" id="emailTKT@{@TK.tenTaiKhoan}">
                        <input type="text" class="emailTaiKhoan emailTK@{@TK.tenTaiKhoan}" value="@TK.email"/>
                    </div>
                    <div id="emailTKTT@{@TK.tenTaiKhoan}">@TK.email</div>
                </td>
                <td>
                    <div>
                        <img class="editTK" id="@TK.tenTaiKhoan" src="../Images/icon_edit.png">
                        <img class="deleteTK" id="@TK.tenTaiKhoan" src="../Images/icon_delete.png">
                        <img class="save_editTK nonDisplay" id="@TK.tenTaiKhoan" src="../Images/checkmark2.png">
                        <img class="cancel_editTK nonDisplay" id="@TK.tenTaiKhoan" src="../Images/cross.png">
                    </div>
                </td>
            </tr>
          }
        }
    </tbody>
</table>
<div class="pagging">
    Trang @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    / @Model.PageCount

    @if (Model.HasPreviousPage)
    {
        <a class="uibutton paggingR" id="1" title="Về trang đầu"><<</a>
        @Html.Raw(" ");
                      var page = Model.PageNumber - 1;
        <a class="uibutton paggingR" id="@{@page}" title="Về trang trước">< Lùi</a>
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Lùi
    }

    @if (Model.HasNextPage)
    {
        var page = Model.PageNumber + 1;
        <a class="uibutton paggingR" id="@{@page}" title="Về trang sau">Tiến ></a>
        @Html.Raw(" ");
                      page = Model.PageCount;
        <a class="uibutton paggingR" id="@{@page}" title="Về trang cuối">>></a>
    }
    else
    {
        @: Tiến >
        @Html.Raw(" ")
        @:>>
    }
</div>
